# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=berry-lang
pkgver=1.1.0
pkgrel=0
pkgdesc="Ultra-lightweight embedded scripting language"
url="https://github.com/berry-lang/berry"
arch="all !s390x" # tests fail on big-endian
license="MIT"
makedepends="python3 readline-dev"
source="https://github.com/berry-lang/berry/archive/refs/tags/v$pkgver/berry-lang-$pkgver.tar.gz"
builddir="$srcdir/berry-$pkgver"

build() {
	make
}

check() {
	local testcase
	for testcase in tests/*; do
		./berry $testcase
	done
}

package() {
	install -Dm755 berry -t "$pkgdir"/usr/bin
}

sha512sums="
84e035392d659e5de310a8a536c2abb1e0973cdfd7d7c3feb7eb433711d3fdd1b275065d54877b8ef824e3d4413dcb063c688a22f700724a422f90f77522aad7  berry-lang-1.1.0.tar.gz
"
